from typing import List

class Solution:
    def wiggleSort(self, nums: List[int]) -> None:
        """
        Do not return anything, modify nums in-place instead.
        """
        nums.sort()
        t1 = []
        t2 = []
        mid = (len(nums) - 1) // 2
        for i in range(len(nums)):
            if i <= mid:
                t1.append(nums[i])
            else:
                t2.append(nums[i])
        
        t = True
        i = 0
        for i in range(len(nums)):
            if t:
                nums[i] = t1.pop()
            else:
                nums[i] = t2.pop()
            t = not t        

class Solution2:
    def wiggleSort(self, nums: List[int]) -> None:
        """
        Do not return anything, modify nums in-place instead.
        """
        nums.sort()
        mid = int((len(nums) - 1 ) / 2)
        
        nums[::2], nums[1::2] = nums[mid::-1], nums[len(nums):mid:-1]
        